import { requestClient } from '#/api/request';

export interface ContentCategoryTreeResult {
  categoryId: string;
  categoryName: string;
  children?: ContentCategoryTreeResult[];
  hasDropdown?: boolean;
}
export interface BannerResult {
  bannerId: string;
  title: string;
  description: string;
  imageUrl: string;
  css: string;
  jumpUrl?: string;
}
export interface TenantResult {
  tenantContactAddress: string;
  tenantContactEmail: string;
  tenantContactPhone: string;
  tenantName: string;
  tenantDomain: string; // 租户域名
  tenantCode?: string; // 租户code
  tenantContact?: string; // 租户联系人
  tenantLogo?: string; // 租户logo
  tenantType: string; // 租户类型
}
export const contentCategoryTree = () => {
  return requestClient.get<ContentCategoryTreeResult[]>(
    '/contentCategory/tree',
  );
};
export const getBanner = () => {
  return requestClient.get<BannerResult[]>('carousel/list');
};

export const tenantInfo = () => {
  return requestClient.get<TenantResult>('/tenant/tenant');
};
